<?php

namespace catchAdmin\phone\controller;

use catchAdmin\phone\request\need\saveRequest;
use catcher\CatchResponse;

class Need extends LoginCatchController
{

    private $model = null;


    public function __construct()
    {
        parent::__construct();

        $this->model = (new \catchAdmin\phone\model\Need());
    }


    /**
     * 详情
     */
    public function save(saveRequest $request)
    {
        $param = request()->param();

        return CatchResponse::success($this->model->saveData($param));
    }


    public function finish()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->finish($param));
    }


    public function pay()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->pay($param));
    }

    ############################################################################################


    /**
     * 列表
     */
    public function index()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->indexData($param));
    }


    public function indexMatchUser()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->indexMatchUser($param));
    }


    public function indexPub()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->indexPub($param));
    }


    /**
     * 列表
     */
    public function indexStage()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->indexStage($param));
    }


    /**
     * 详情
     */
    public function read()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->read($param));
    }


}
